#ifndef GROUPCHAT_H
#define GROUPCHAT_H
#include"Account/account.h"
#include <QMainWindow>
#include <QStandardItemModel>
#include<QAbstractItemView>
#include"QTableView"
#include"Socket/TCPSocket.h"
namespace Ui {
class groupchat;
}

class groupchat : public QMainWindow
{
    Q_OBJECT

public:
    QString myid;
    QString groupid;
    void getgrouphistory(QList<QPair<QString,QString>> list);
    explicit groupchat(QWidget *parent = nullptr);
    ~groupchat();
    int groupmyfriendnum=0;
    QMap<QString ,QString>  groupNameAndId;
    void getinfo(QMap<QString ,QString> map);
    void GetGroupInfo(QString gid,QString uid,QString info);
QTableView *grouptableView;
QStandardItemModel *grouptableModel;
private slots:
void on_pushButton_clicked();

void on_pushButton_2_clicked();

signals:
   void sendGroupMsg(QString gid,QString uid,QString info);
   void  addfriends(QString id);
private:
    Ui::groupchat *ui;
     QList<QPair<QString,QString>> grouphistory;
};

#endif // GROUPCHAT_H
